<template>
  <div>
    <div @click="back">
      <van-nav-bar left-text="返回" left-arrow title="详情" />
    </div>
    <div v-for="item in listP" :key="item.id" class="fate">
      <p class="biao">{{item.title}}</p>
      <p class="zuoz">作者：{{item.author}}</p>
      <p class="timer">{{item.createTime}}</p>
      <img :src="'http://124.93.196.45:10001/'+item.imgUrl" alt />
      <p v-html="item.content" class="html"></p>
    </div>
  </div>
</template>

<script>

import mixin from '@/mixin/flag'
import { goodlun } from '@/service/taxonomic'
export default {
  mixins: [mixin],

  data() {
    return {
      Tid: '',
      listP: [],
    }
  },
  created() {
    const res0 = this.$store.state.lvsID
    console.log(res0)
    this.Tid = res0
  },
  async mounted() {
    const arr = await goodlun({
      id: this.Tid,
    })
    console.log('Arr', arr)
    this.listP.push(arr.data.data)
  },
  methods: {
    back() {
      this.$router.push('/CategOrized')
    },
  },
}
</script>

<style lang="scss" scoped>
.fate {
  .zuoz {
    font-size: 15px;
    padding: 5px 8px;
    width: 100%;
    text-align: center;
  }
  .biao {
    font-size: 16px;
    padding: 5px 8px;
    width: 100%;
    text-align: center;
  }
  .timer {
    font-size: 14px;
    padding: 5px 8px;
    width: 100%;
    text-align: center;
  }
  .html {
    font-size: 14px;
    padding: 5px 8px;
  }
  img {
    width: 100%;
    height: 260px;
  }
}
</style>